<seed-content class="seed-crowd-step3-page">
  <seed-toolbar-header>
    <seed-toolbar-title>发起众筹3</seed-toolbar-title>
    <seed-toolbar-menu></seed-toolbar-menu>
  </seed-toolbar-header>
  <div class="seed-crowd-step3">
    <div class="crowd-sku-list">
      <ul>
        <li *ngFor="let item of skuList">
          <p class="sku-name">{{item.rightName | truncate:8}}</p>
          <div class="sku-info">
            <div class="sku-money">
              <p>金额</p>
              <p>¥ {{(item.price/100).toFixed(2)}}</p>
            </div>
            <div class="sku-number">
              <p>数量</p>
              <p>×{{item.quantity}}</p>
            </div>
            <div class="sku-subtotal-money">
              <p>合计</p>
              <p>¥ {{((item.price/100)*item.quantity).toFixed(2)}}</p>
            </div>
          </div>
        </li>
        <div class="sku-total-money border-top-scaleY">
          <span>总金额</span>
          <span>¥ {{totalMoney.toFixed(2)}}</span>
        </div>
      </ul>
    </div>
    <div class="crowd-sku-min-money">
      <form [formGroup]="step3Form">
        <div class="crowd-step-form crowd-min-money border-bottom-scaleY">
          <div class="crowd-form-out">
            <div class="crowd-form-label">*众筹最小金额</div>
            <div class="crowd-form-input">
              <input type="tel"
                     placeholder="请输入最小众筹金额"
                     formControlName="crowdMoney"
                     [class.value-color]="step3Form.controls['crowdMoney'].value"
              >
              <i class="crowd-tips" (click)="showTips()"></i>
            </div>
          </div>
          <p class="validator-style"
             *ngIf="(!step3Form.controls['crowdMoney'].valid && !step3Form.controls['crowdMoney'].pristine) || (step3Form.controls['crowdMoney'].value>totalMoney)"
          >请输入1-6位且不为0的数字;众筹最小金额必须≤总金额</p>
          <p class="crowd-money-tips" *ngIf="tipsShow">若达到该金额,你可以提前结束众筹;若时间到了也算成功</p>
        </div>
        <div class="crowd-step-form crowd-end-time">
          <div class="crowd-form-out">
            <div class="crowd-form-label">*众筹截止时间</div>
            <div class="crowd-form-input crowd-end">
              <div class="crowd-end-time-case">
                <span>{{params.crowdEndTime?(params.crowdEndTime | amDateFormat:'YYYY/MM/DD HH:mm'):'请选择众筹结束日期'}}</span>
                <input type="datetime-local"
                       formControlName="crowdEndTime"
                       (change)="dealEndTime()"
                       [class.value-color]="step3Form.controls['crowdEndTime'].value"
                >
              </div>
          </div>
          </div>
          <p class="validator-style"
             [class.show-input]="step3Form.controls['crowdEndTime'].valid || step3Form.controls['crowdEndTime'].pristine"
          >请选择众筹截止日期,众筹结束时间不能晚于活动开始时间</p>
          <p class="validator-style"
             *ngIf="step3Form.controls['crowdEndTime'].value && !nowCheck"
          >众筹结束时间不能早于当前时间</p>
        </div>
      </form>
    </div>
  </div>
</seed-content>
<div class="seed-crowd-button">
  <button (click)="submitLaunch()"
          [disabled]="!step3Form.valid || !nowCheck"
  >发布</button>
</div>
